<%@page import="java.util.List"%>
<%@page import="org.springframework.web.context.support.WebApplicationContextUtils"%>
<%@page import="org.springframework.context.ApplicationContext"%>
<%@page import="com.sinba.common.system.service.ITransactionRecordService"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> 
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>所有正常账号现金余额</title>
<%
ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(getServletContext());
ITransactionRecordService transactionRecordService = (ITransactionRecordService)ac.getBean("transactionRecordService");
List<Object[]> lists = transactionRecordService.statDynamicAccountBalance();

request.setAttribute("lists",lists);
%>
</head>
<body>
<table>
<tr>
	<th>序号</th>
	<th>会员编号</th>
	<th>现金银行</th>
	<th>统计</th>
</tr>
<c:set var="cunt" value="0"></c:set>
<c:forEach items="${lists}" var="data" varStatus="status">
<tr>
	<td>${ status.index + 1}</td> 
	<td align="center">${data[0]}</td>
	<td align="left">${data[1]}</td>
	<td align="left"><fmt:formatNumber value="${cunt+data[1]}" pattern="#0.0000"/></td>
</tr>
<c:set var="cunt" value="${cunt+data[1]}"></c:set>
</c:forEach>
</table>
</body>
</html>